// 菜单管理
import request from '@/utils/request'

// 获取菜单树
export const getMenuTree = (data) => {
  return request({ url: `/xddcloud-psc/psc/menu/tree`, method: 'POST', data })
}

// 新增菜单
export const addMenu = (data) => {
  return request({ url: `/xddcloud-psc/psc/menu/add`, method: 'POST', data })
}

// 修改菜单
export const editMenu = (data) => {
  return request({ url: `/xddcloud-psc/psc/menu/edit`, method: 'PUT', data })
}

// 删除菜单
export const deleteMenu = (params) => {
  return request({ url: `/xddcloud-psc/psc/menu/logicDeleteByMenu`, method: 'PUT', params })
}

// 获取菜单详情
export const getMenuDetail = (params) => {
  return request({ url: `/xddcloud-psc/psc/menu/get/${params.id}`, method: 'GET' })
}
